/*
 *
 * (c) Copyright Ascensio System Limited 2010-2023
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * http://www.apache.org/licenses/LICENSE-2.0
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
*/


@import "../../../../skins/base.less";
@import "../../../../skins/default/params.less";

/*-----Attachments control---------*/

/*----question window----*/

#questionWindowAttachments {
    p:first-child {
        margin-top: 0px;
    }

    p:last-child {
        margin-top: 20px;
        margin-bottom: 0px;
    }

    .button.blue.marginLikeButton {
        margin-right: 8px;
    }
}
/*-----empty screen control---------*/

#emptyDocumentPanel .emptyScrCtrl .emptyScrBttnPnl {
    background-image: none;

    a {
        background-color: transparent;
        background-position: left bottom;
        background-repeat: no-repeat;
        display: inline-block;
        margin: 10px 0 0 20px;
        padding: 0;
        position: relative;
        text-align: center;
        color: @EmptyDocumentPanel-a;
    }
}

a#uploadFirstFile:after,
a#createFirstDocument:after {
    background-color: transparent;
    background-position: 0 0;
    background-repeat: no-repeat;
    content: "";
    display: block;
    height: 20px;
    margin-left: -20px;
    margin-top: -8px;
    position: absolute;
    top: 50%;
    width: 16px;
}

#emptyDocumentPanel .emptyScrCtrl .emptyScrBttnPnl a#uploadFirstFile:after {
    background-image: url("imagescss/upload.png");
}
#emptyDocumentPanel .emptyScrCtrl .emptyScrBttnPnl a#createFirstDocument:after {
    background-image: url("imagescss/new_file.png");
}
/*------info panel-----*/
.infoPanelAttachFile {
    height: 31px;


    #fileMaxSize {
        color: #83888D;
        font-size: 12px;
        float: left;
        padding: 8px 10px 8px 0px;
    }

    .warn {
        display: none;
        color: #83888D;
        background-repeat: no-repeat;
        background-position: 15px center;
        padding: 8px 10px 8px 38px;
        float: right;
        background-color: #F6E1A4;
    }
}
/*-----*/
.containerAction {
    margin-bottom: 10px;
    height: 25px;
    position: relative;
    clear: both;
    display: none;

    .baseLinkAction {
        color: @textColor;
    }

    > span {
        display: block;
        float: left;
        background-repeat: no-repeat;
        background-position: left center;
        padding: 0 0 0 20px;
        cursor: pointer;
        margin-top: 10px;
        margin-right: 15px;
    }

    #showDocumentPanel {
        background-image: url("imagescss/new_file.png");
        z-index: 4354565;
    }

    #linkNewDocumentUpload {
        cursor: pointer;
        background-image: url("imagescss/upload.png");
        position: relative;

        input {
            height: 25px;
            width: 180px;
            position: absolute;
            top: 0;
            left: 0;
            opacity: 0;
            filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0);
            cursor: pointer;
            font-size: 25px;
        }
    }

    span.linkAttachFile {
        background-image: url("imagescss/attach.png");
        padding-left: 21px;
    }
}

.wrapperFilesContainer {
    height:auto;
}

span.version {
    color: @body-color;
    font-size: 10px;
    margin: 1px 0 0 5px;
    max-width: 40px;
    overflow: hidden;
    padding: 0 2px;
    text-decoration: none;
    background-color: #4AA4BB;
    float: left;
    display: none;

    .borderRadius(2px); 
    display: inline-block;
}

#attachmentsContainer {
    margin-top: 10px;
    padding: 0 10px;
    width: 100%;
    border-collapse: collapse;
    clear: left;

    a {
        outline: none;
    }

    tr {
        display: none;

        td {
            border-top: 1px solid @borderColor;

            &:first-child {
                padding-top: 5px;
                width: 69%;

                a {
                    color: @textColor;
                    display: inline-block;
                    margin-left: 5px;
                    max-width: 500px;
                    padding-left: 25px;
                    padding-top: 4px;
                    text-decoration: none;
                    white-space: nowrap;
                    width: auto;

                    &:hover div.attachmentsTitle {
                        text-decoration: underline;
                    }

                    &.noDecoration:hover div.attachmentsTitle {
                        text-decoration: none;
                        cursor: default;
                    }

                    &.noEdit:hover {
                        text-decoration: none;
                    }
                }
            }

            &:last-child {
                width: 40%;
                text-align: right;
                padding-right: 10px;
            }
        }

        &:first-child td {
            border: none;
        }

        &:hover {
            background-color: @activeTable;
        }

        &.noAttach td {
            color: @textColor;
            text-align: left;
            background-image: none;
            background-color: @body-color;
            cursor: default;
        }

        &.newDoc {
            display: none;

            td:first-child {
                padding: 3px 0 3px 31px;
                width: 60%;
                background-position: 6px -34px;
            }
        }
    }

    tbody tr {
        td.editFile a {
            display: none;
            float: right;
            margin: 4px 0 0 5px;
            width: 16px;
            height: 16px;

            &[id^="editDoc_"] {
                background: url('../../../../skins/default/images/svg/documents/@{pencil-gray}');
            }

            &.deleteDoc,
            &.unlinkDoc {
                background: url("imagescss/trash.png") no-repeat 0 0 transparent;
            }

            &.downloadLink {
                background: url("imagescss/download_action.png") no-repeat 0 0 transparent;
            }
        }

        &:hover td.editFile a {
            display: inline-block;
        }
    }

    div.attachmentsTitle {
        overflow: hidden;
        display: block;
        float: left;
        max-width: 390px;
        .text-overflow();
    }
}


td img[id^="imgZoom_"] {
    max-height: 800px;
    display: none;
}

/*---------New file---------*/
tr.newDoc {
    input {
        height: 20px;
        width: 400px;
        float: left;
    }

    span.remove,
    span.createFile {
        cursor: pointer;
        margin-left: 12px;
        float: left;
    }
}

/*--- information-upload-panel --*/

.information-upload-panel {
    clear: both;
    font-size: 11px;
    color: @textColorBlackDark;

    div {
        float: left;
        margin-right: 15px;
    }

    .checkbox-container {
        label {
            float: left;
        }

        input {
            float: left;
            margin: 0 5px 0 0;
        }
    }
}

